package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 盘点登记
 * @author jinss
 * @date 2020-08-31 14:33:05
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="CountingRegister对象", description="盘点登记")
@TableName("wms_counting_register")
public class CountingRegister extends BasicEntity{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识",hidden = true)
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "盘点任务号",required = true)
    @TableField("task_code")
    private String taskCode;

    @ApiModelProperty(value = "登记类型：0普通(默认)，1补登")
    @TableField("register_type")
    private Integer registerType;

    @ApiModelProperty(value = "盘点单号")
    @TableField("counting_code")
    private String countingCode;

    @ApiModelProperty(value = "盘点明细标识")
    @TableField("counting_item_code")
    private String countingItemCode;

    @ApiModelProperty(value = "库存标识")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "盘点数量")
    @TableField("counting_quantity")
    @Min(value = 0,message = "盘点数量不能小于0")
    @Digits(integer = 20,fraction = 6)
    private BigDecimal countingQuantity;

    @ApiModelProperty(value = "库存数量")
    @TableField(" inventory_quantity")
    private BigDecimal inventoryQuantity;

    @ApiModelProperty(value = "缺货数量")
    @TableField(" stock_quantity")
    private BigDecimal stockQuantity;

    @ApiModelProperty(value = "状态:0新增，1待盘点，2盘点中，3待审核，4已审核，5作废")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "PDA操作状态:0未盘点，1已盘点")
    @TableField("pda_op_status")
    private Integer pdaOpStatus;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "商品编码")
    @TableField("goods_code")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    @TableField("good_code")
    private String goodCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品条码")
    @TableField("goods_bar_code")
    private String goodsBarCode;

    @ApiModelProperty(value = "单位")
    @TableField("goods_unit")
    private String goodsUnit;

    @ApiModelProperty(value = "库位标识")
    @TableField("location")
    @NotBlank(message = "库位标识不能为空")
    private String location;

    @ApiModelProperty(value = "库位码")
    @TableField("location_name")
    @NotBlank(message = "库位码不能为空")
    private String locationName;

    @ApiModelProperty(value = "生产日期")
    @TableField("gmt_manufacture")
    private LocalDateTime gmtManufacture;

    @ApiModelProperty(value = "过期日期")
    @TableField("gmt_expire")
    private LocalDateTime gmtExpire;

    @ApiModelProperty(value = "存货日期")
    @TableField("gmt_stock")
    private LocalDateTime gmtStock;

    @ApiModelProperty(value = "批次号")
    @TableField("lot")
    private String lot;

    @ApiModelProperty(value = "收货批次号")
    @TableField("receive_lot")
    private String receiveLot;

    @ApiModelProperty(value = "供应商")
    @TableField("supplier")
    private String supplier;

    @ApiModelProperty(value = "序列号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "扩展1")
    @TableField("extend_one")
    private String extendOne;

    @ApiModelProperty(value = "扩展2")
    @TableField("extend_two")
    private String extendTwo;

    @ApiModelProperty(value = "扩展3")
    @TableField("extend_three")
    private BigDecimal extendThree;

    @ApiModelProperty(value = "扩展4")
    @TableField("extend_four")
    private BigDecimal extendFour;

    @ApiModelProperty(value = "扩展5")
    @TableField("extend_five")
    private LocalDateTime extendFive;

    @ApiModelProperty(value = "扩展6")
    @TableField("extend_six")
    private LocalDateTime extendSix;


    @ApiModelProperty(value = "锁定状态：0未锁定，1：锁定")
    @TableField("is_lock")
    private Integer isLock;

    @ApiModelProperty(value = "库存状态")
    @TableField("goods_status")
    private String goodsStatus;

    @ApiModelProperty(value = "库存状态")
    @TableField("goods_status_name")
    private String goodsStatusName;

    @ApiModelProperty(value = "容器号")
    @TableField("container_bar_code")
    private String containerBarCode;

    @ApiModelProperty(value = "货主编码")
    @TableField("shipment_code")
    @NotBlank(message = "货主不能为空")
    private String shipmentCode;

    @ApiModelProperty(value = "货主名称")
    @TableField("shipment_name")
    @NotBlank(message = "货主不能为空")
    private String shipmentName;

    @ApiModelProperty(value = "规格")
    @TableField("spec")
    private String spec;

    @ApiModelProperty(value = "单位名称")
    @TableField("goods_unit_name")
    private String goodsUnitName;


    @ApiModelProperty(value = "库区")
    @TableField("warehouse_space_code")
    private String warehouseSpaceCode;

    @ApiModelProperty(value = "库区名称")
    @TableField("warehouse_space_name")
    private String warehouseSpaceName;
}
